/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tk.eigh.ksvg.renderer;

import java.io.IOException;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderer;
import org.apache.myfaces.commons.util.ArrayUtils;
import org.apache.myfaces.shared.renderkit.html.HTML;
import org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils;
import tk.eigh.ksvg.SVG;

/**
 *
 * @author nt
 */
@JSFRenderer(renderKitId = "SVG", type = "SVGShapeRenderer", family = "ksvg.Shape")
public abstract class SVGShapeRenderer extends SVGRenderer {


    @Override
    public void renderCommonAttributes(ResponseWriter writer, UIComponent component, FacesContext context) throws IOException {
        super.renderCommonAttributes(writer, component, context);
        HtmlRendererUtils.renderHTMLAttributes(writer, component, (String[]) ArrayUtils.concat(SVG.GRAPHICAL_EVENT_ATTRS,
                new String[]{
                    SVG.TRANSFORM_ATTR,
                    SVG.VISIBILITY_ATTR,
                    HTML.STYLE_ATTR,
                    HTML.STYLE_CLASS_ATTR,
                    SVG.FILTER_TAG_NAME
                }));
    }
}
